Attributed Context-Sensitive Graph Grammars
نویسنده
چکیده
The paper introduces a concept of attributed context-sensitive graph grammars. The graph grammars are a graphical generalization of the textual grammars and can thus be used to specify the syntax of graphical programming or modeling languages. The attributed graph grammars extend the basic graph grammars with definitions of attributes and the associated attribute evaluation rules. By analogy to the attributed textual grammars, the purpose of the attributes and the rules is to define the semantic elements of a graphical language. The introduced concept is illustrated by an example of a grammar-driven conversion of flowcharts to the equivalent C code. The presented example might find its use in introductory programming courses.
منابع مشابه
Contextual Graph Grammars Characterising Rational Graphs
Deterministic graph grammars generate a family of infinite graphs which characterise contextfree (word) languages. The present paper introduces a context-sensitive extension of these grammars. We prove that this extension characterises rational graphs (whose traces are contextsensitive languages). We illustrate that this extension is not straightforward: the most obvious context-sensitive graph...
متن کاملPolynomial Pregroup Grammars parse Context Sensitive Languages
Pregroup grammars with a possibly infinite number of lexical entries are polynomial if the length of type assignments for sentences is a polynomial in the number of words. Polynomial pregroup grammars are shown to generate the standard mildly context sensitive formal languages as well as some context sensitive natural language fragments of Dutch, SwissGerman or Old Georgian. A polynomial recogn...
متن کاملUniform Recognition for Acyclic Context-Sensitive Grammars is NP-complete
Context-sensitive grammars in which each rule is of the forln aZfl-~ (-*Tfl are acyclic if the associated context-free grammar with the rules Z ~ 3' is acyclic. The problem whether an intmt string is in the language generated by an acyclic context-sensitive grammar is NP-conlplete.
متن کاملConstructing Confluent Context-sensitive Graph Grammars from Non-confluent Productions for Parsing Efficiency
The efficient parsing algorithms are usually confined to confluent graph grammars in context-sensitive formalisms, whereas the confluence condition is not frequently met by graph grammars in practical applications. This paper, based on the Reserved Graph Grammar (RGG) formalism, proposes an extended formalism XRGG which allows imposing constraints characterizing application situations on graph ...
متن کاملSyntactic Processing of Diagrams by Graph Grammars
We deal with syntactic definitions and processing of program diagrams based on graph grammars with respect to the mechanical drawing. We propose an attribute NCE graph grammar of hierarchical diagrams such as structured program diagrams. We also propose attribute context-free and context-sensitive NCE graph grammars for nested and tessellation diagrams, respectively. Attribute rules are used fo...
متن کامل